package ui.view;

import ui.listener.HTableMode;

import javax.swing.*;
import javax.swing.table.AbstractTableModel;

public class HTable extends JTable
{
    private boolean editable;
    public HTable(HTableMode abstractTableModel) {
        super(abstractTableModel);
    }

    public void setEditable(boolean editable) {
        this.editable = editable;
    }

    @Override
    public boolean isCellEditable(int row, int column) {
        if (!editable)
        {
            return false;
        }
        if (column == 0)
        {
            return false;
        }
        return true;
    }

    public HTableMode getModel()
    {
        return (HTableMode) super.getModel();
    }


}